package cn.kgc.kgde.bookstore.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.github.yulichang.annotation.EntityMapping;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author myt
 * @since 2022-05-31
 */
@Data
@TableName("evaluation")
@ApiModel(value = "Evaluation对象", description = "")
public class Evaluation implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("评价id")
    @TableId(value = "evaluationId", type = IdType.AUTO)
    private Long evaluationId;

    @ApiModelProperty("评价用户id")
    private String userCode;

    @ApiModelProperty("商品id")
    private Long bookId;

    @ApiModelProperty("对应订单id")
    private Long orderId;

    @ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createDate;

    @ApiModelProperty("评价内容")
    private String evaluation;

    /**
     * 查询下级 一对多
     */
//    @TableField(exist = false)
//    @EntityMapping(thisField = "bookId", joinField = "id")
//    private List<Evaluation> childEvaluation;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getEvaluationId() {
        return evaluationId;
    }

    public void setEvaluationId(Long evaluationId) {
        this.evaluationId = evaluationId;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public Long getBookId() {
        return bookId;
    }

    public void setBookId(Long bookId) {
        this.bookId = bookId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getEvaluation() {
        return evaluation;
    }

    public void setEvaluation(String evaluation) {
        this.evaluation = evaluation;
    }

}
